package com.wry.rpc;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * <h1> 库存扣减RPC调用 <h1>
 *
 * @author 魏如元
 * @since 2022/10/14
 */
@FeignClient(name = "stock-rpc",url = "${stock.server.url}")
public interface DeductionStockRpcService {

    @PostMapping("stock/deduction/{buyNum}/{goodId}")
    void deductionStock(@PathVariable(value = "buyNum") Integer buyNum, @PathVariable(value = "goodId") Integer goodId);
}
